package com.jctrip.hotel.source.model.greentree.resp;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlText;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * @Author：Haruhi
 * @description:
 * @Date：2023/8/30 23:55
 * @Package：com.jctrip.hotel.source.model.greentree.resp
 * @Project：hotel-main
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@JacksonXmlRootElement(localName = "GetHotelInfo")
public class GetHotelInfoResp extends GreenTreeBaseResp {

    @JacksonXmlProperty(localName = "ReqHotels")
    private ReqHotels reqHotels;

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    @Builder
    public static class ReqHotels {
//        @JacksonXmlElementWrapper(useWrapping = false)
        @JacksonXmlProperty(localName = "ReqHotel")
        private ReqHotelBean ReqHotel;

        @Data
        @NoArgsConstructor
        @AllArgsConstructor
        @Builder
        @JsonIgnoreProperties(ignoreUnknown = true)
        public static class ReqHotelBean {
            @JacksonXmlProperty(localName = "HotelBaseInfo")
            private HotelBaseInfoBean hotelBaseInfo;
//            @JacksonXmlProperty(localName = "HotelService")
//            private HotelServiceBean hotelService;
//            @JacksonXmlProperty(localName = "HotelTrafic")
//            private HotelTraficBean hotelTrafic;
//            @JacksonXmlProperty(localName = "HotelTour")
//            private HotelTourBean hotelTour;
//            @JacksonXmlProperty(localName = "HotelEatery")
//            private HotelEateryBean hotelEatery;
//            @JacksonXmlProperty(localName = "HotelMarket")
//            private HotelMarketBean hotelMarket;
//            @JacksonXmlProperty(localName = "HotelEntertainment")
//            private HotelEntertainmentBean hotelEntertainment;
//            @JacksonXmlProperty(localName = "HotelHospital")
//            private HotelHospitalBean hotelHospital;
            /**
             * BankItem : {"BankName":"工商银行","Address":"宜川路401号","Telephone":"021－56612939","Distance":1.8}
             */

//            @JacksonXmlProperty(localName = "HotelBank")
//            private HotelBankBean hotelBank;
//            @JacksonXmlProperty(localName = "HotelDriveRoute")
//            private HotelDriveRouteBean hotelDriveRoute;
//            @JacksonXmlProperty(localName = "HotelCard")
//            private HotelCardBean hotelCard;
            /**
             * HotelPic : {"SmallPic":{"ImgUrl":"http://system.greentree.com.cn:8080/op/Module_ERP/Images/HotelDisplay/inn021002.jpg"},"BigPic":{"ImgUrl":"http://system.greentree.com.cn:8080/op/Module_ERP/Images/HotelDisplay/inn021002b.jpg"}}
             * HotelMap : {"SmallPic":{"ImgUrl":"http://system.greentree.com.cn:8080/op/Module_ERP/Images/HotelDisplay/smap021002.jpg"},"BigPic":{"ImgUrl":"http://system.greentree.com.cn:8080/op/Module_ERP/Images/HotelDisplay/bmap021002.jpg"}}
             */
            @JacksonXmlProperty(localName = "HotelPictureInfo")
            private HotelPictureInfoBean hotelPictureInfo;

            @Data
            @NoArgsConstructor
            @AllArgsConstructor
            @Builder
            public static class HotelBaseInfoBean {
                /**
                 * 酒店编号
                 */
                @JacksonXmlProperty(localName = "HotelCode")
                private String hotelCode;
                /**
                 * 酒店名称
                 */
                @JacksonXmlProperty(localName = "HotelName")
                private String hotelName;
                /**
                 * 酒店地址
                 */
                @JacksonXmlProperty(localName = "HotelAddress")
                private String hotelAddress;
                /**
                 * 城市
                 */
                @JacksonXmlProperty(localName = "CityName")
                private String cityName;
                /**
                 * 省
                 */
                @JacksonXmlProperty(localName = "State")
                private String state;
                /**
                 * 邮编
                 */
                @JacksonXmlProperty(localName = "PostalCode")
                private String postalCode;
                /**
                 * 邮箱
                 */
                @JacksonXmlProperty(localName = "ContactEmail")
                private String contactEmail;
                /**
                 * 酒店电话
                 */
                @JacksonXmlProperty(localName = "HotelPhone")
                private String hotelPhone;

                /**
                 * 电话号码
                 */
                @JacksonXmlElementWrapper(localName = "ContactPhone")
                @JacksonXmlProperty(localName = "PhoneNo")
                private List<PhoneNoBean> phoneNo;
                /**
                 * 传真
                 */
                @JacksonXmlProperty(localName = "Fax")
                private String fax;
                /**
                 * 酒店财务负责人信息
                 */
                @JacksonXmlProperty(localName = "HotelConnector")
                private String hotelConnector;
                /**
                 * 主要介绍
                 */
                @JacksonXmlProperty(localName = "MainIntro")
                private String mainIntro;
                /**
                 * 经度
                 */
                @JacksonXmlProperty(localName = "Longitude")
                private BigDecimal longitude;
                /**
                 * 纬度
                 */
                @JacksonXmlProperty(localName = "Latitude")
                private BigDecimal latitude;


                @Data
                @NoArgsConstructor
                @AllArgsConstructor
                @Builder
                public static class PhoneNoBean {
                    @JacksonXmlProperty(localName = "phoneType", isAttribute = true)
                    private String phoneType;
                    @JacksonXmlText
                    private String phoneNo;

                }

            }

            @Data
            @NoArgsConstructor
            @AllArgsConstructor
            @Builder
            public static class HotelServiceBean {
                @JacksonXmlElementWrapper(useWrapping = false)
                @JacksonXmlProperty(localName = "SevItem")
                private List<ServiceNameBean> sevItem;

                @Data
                @NoArgsConstructor
                @AllArgsConstructor
                @Builder
                public static class ServiceNameBean {
                    @JacksonXmlProperty(localName = "ServiceName")
                    private String serviceName;
                }
            }

            @Data
            @NoArgsConstructor
            @AllArgsConstructor
            @Builder
            public static class HotelTraficBean {
                /**
                 * Destination : 上海虹桥机场
                 * Telephone : 021-52604620
                 * Distance : 15
                 * AutoBus :
                 * BusStation : 925转927路
                 * BusRate : 4
                 * TexiRate : 40
                 */

                @JacksonXmlElementWrapper(useWrapping = false)
                @JacksonXmlProperty(localName = "TfcItem")
                private List<TfcItemBean> tfcItem;


                @Data
                @NoArgsConstructor
                @AllArgsConstructor
                @Builder
                public static class TfcItemBean {
                    @JacksonXmlProperty(localName = "Destination")
                    private String destination;
                    @JacksonXmlProperty(localName = "Telephone")
                    private String telephone;
                    @JacksonXmlProperty(localName = "Distance")
                    private String distance;
                    @JacksonXmlProperty(localName = "AutoBus")
                    private String autoBus;
                    @JacksonXmlProperty(localName = "BusStation")
                    private String busStation;
                    @JacksonXmlProperty(localName = "BusRate")
                    private String busRate;
                    @JacksonXmlProperty(localName = "TexiRate")
                    private String texiRate;

                }
            }

            @Data
            @NoArgsConstructor
            @AllArgsConstructor
            @Builder
            public static class HotelTourBean {
                /**
                 * Sightseeing : 上海动物园
                 * Address : 虹桥路2381号
                 * Telephone : 021-62687775
                 * Distance : 14.8
                 * BusinessHours : 7:00-17:00
                 * AutoBus : 807、911、936、941
                 * BusRate :
                 * TexiRate : 36
                 */
                @JacksonXmlElementWrapper(useWrapping = false)
                @JacksonXmlProperty(localName = "TourItem")
                private List<TourItemBean> tourItem;

                @Data
                @NoArgsConstructor
                @AllArgsConstructor
                @Builder
                public static class TourItemBean {
                    @JacksonXmlProperty(localName = "Sightseeing")
                    private String sightseeing;
                    @JacksonXmlProperty(localName = "Address")
                    private String address;
                    @JacksonXmlProperty(localName = "Telephone")
                    private String telephone;
                    @JacksonXmlProperty(localName = "Distance")
                    private String distance;
                    @JacksonXmlProperty(localName = "BusinessHours")
                    private String businessHours;
                    @JacksonXmlProperty(localName = "AutoBus")
                    private String autoBus;
                    @JacksonXmlProperty(localName = "BusRate")
                    private String busRate;
                    @JacksonXmlProperty(localName = "TexiRate")
                    private String texiRate;

                }
            }

            @Data
            @NoArgsConstructor
            @AllArgsConstructor
            @Builder
            public static class HotelEateryBean {
                /**
                 * RestaurantName : 普陀山海鲜酒楼
                 * Address : 骊山路16号中山北路口
                 * Telephone : 021－56087979
                 * Distance : 0.1
                 * BusinessHours : 11:00-22:00
                 * Feature : 宁波菜
                 */

                @JacksonXmlElementWrapper(useWrapping = false)
                @JacksonXmlProperty(localName = "EatItem")
                private List<EatItemBean> eatItem;

                @Data
                @NoArgsConstructor
                @AllArgsConstructor
                @Builder
                public static class EatItemBean {
                    @JacksonXmlProperty(localName = "RestaurantName")
                    private String restaurantName;
                    @JacksonXmlProperty(localName = "Address")
                    private String address;
                    @JacksonXmlProperty(localName = "Telephone")
                    private String telephone;
                    @JacksonXmlProperty(localName = "Distance")
                    private Object distance;
                    @JacksonXmlProperty(localName = "BusinessHours")
                    private String businessHours;
                    @JacksonXmlProperty(localName = "Feature")
                    private String feature;

                }
            }

            @Data
            @NoArgsConstructor
            @AllArgsConstructor
            @Builder
            public static class HotelMarketBean {
                /**
                 * MarketName : 乐购超市
                 * Address : 中山北路光新路
                 * Telephone : 021－52949466
                 * Distance : 1.2
                 * BusinessHours : 9：00—22：00
                 * Feature : 综合商场
                 */

                @JacksonXmlElementWrapper(useWrapping = false)
                @JacksonXmlProperty(localName = "MktItem")
                private List<MktItemBean> mktItem;


                @Data
                @NoArgsConstructor
                @AllArgsConstructor
                @Builder
                public static class MktItemBean {
                    @JacksonXmlProperty(localName = "MarketName")
                    private String marketName;
                    @JacksonXmlProperty(localName = "Address")
                    private String address;
                    @JacksonXmlProperty(localName = "Telephone")
                    private String telephone;
                    @JacksonXmlProperty(localName = "Distance")
                    private String distance;
                    @JacksonXmlProperty(localName = "BusinessHours")
                    private String businessHours;
                    @JacksonXmlProperty(localName = "Feature")
                    private String feature;

                }
            }

            @Data
            @NoArgsConstructor
            @AllArgsConstructor
            @Builder
            public static class HotelEntertainmentBean {
                /**
                 * PlaceName : HORSE娱乐会所
                 * Address : 沪太路365号1403室
                 * Telephone : 021-56558114
                 * Distance : 1.5
                 * BusinessHours :
                 * Feature : KTV
                 */

                @JacksonXmlElementWrapper(useWrapping = false)
                @JacksonXmlProperty(localName = "EtmItem")
                private List<EtmItemBean> etmItem;


                @Data
                @NoArgsConstructor
                @AllArgsConstructor
                public static class EtmItemBean implements Serializable {
                    @JacksonXmlProperty(localName = "PlaceName")
                    private String placeName;
                    @JacksonXmlProperty(localName = "Address")
                    private String address;
                    @JacksonXmlProperty(localName = "Telephone")
                    private String telephone;
                    @JacksonXmlProperty(localName = "Distance")
                    private Object distance;
                    @JacksonXmlProperty(localName = "BusinessHours")
                    private String businessHours;
                    @JacksonXmlProperty(localName = "Feature")
                    private String feature;

                }
            }

            @Data
            @NoArgsConstructor
            @AllArgsConstructor
            @Builder
            public static class HotelHospitalBean {
                /**
                 * HospitalName : 普陀区中心医院
                 * Address : 兰溪路164号
                 * Telephone : 021-62572723
                 * Distance : 2
                 * Feature :
                 */

                @JacksonXmlElementWrapper(useWrapping = false)
                @JacksonXmlProperty(localName = "HsplItem")
                private List<HsplItemBean> hsplItem;


                @Data
                @NoArgsConstructor
                @AllArgsConstructor
                @Builder
                public static class HsplItemBean {
                    @JacksonXmlProperty(localName = "HospitalName")
                    private String hospitalName;
                    @JacksonXmlProperty(localName = "Address")
                    private String address;
                    @JacksonXmlProperty(localName = "Telephone")
                    private String telephone;
                    @JacksonXmlProperty(localName = "Distance")
                    private String distance;
                    @JacksonXmlProperty(localName = "Feature")
                    private String feature;

                }
            }

            @Data
            @NoArgsConstructor
            @AllArgsConstructor
            @Builder
            public static class HotelBankBean {
                /**
                 * BankName : 工商银行
                 * Address : 宜川路401号
                 * Telephone : 021－56612939
                 * Distance : 1.8
                 */

                @JacksonXmlElementWrapper(useWrapping = false)
                @JacksonXmlProperty(localName = "BankItem")
                private List<BankItemBean> bankItem;


                @Data
                @NoArgsConstructor
                @AllArgsConstructor
                @Builder
                public static class BankItemBean {
                    @JacksonXmlProperty(localName = "BankName")
                    private String bankName;
                    @JacksonXmlProperty(localName = "Address")
                    private String address;
                    @JacksonXmlProperty(localName = "Telephone")
                    private String telephone;
                    @JacksonXmlProperty(localName = "Distance")
                    private String distance;

                }
            }

            @Data
            @NoArgsConstructor
            @AllArgsConstructor
            @Builder
            public static class HotelDriveRouteBean {
                /**
                 * Destination : 虹桥机场 方向
                 * Route : 虹桥机场→延安高架 →内环线（大转——方向沪太路方向）→镇坪路出口→中山沪太酒店
                 */

                @JacksonXmlElementWrapper(useWrapping = false)
                @JacksonXmlProperty(localName = "DRItem")
                private List<DRItemBean> dRItem;


                @Data
                @NoArgsConstructor
                @AllArgsConstructor
                @Builder
                public static class DRItemBean {
                    @JacksonXmlProperty(localName = "Destination")
                    private String destination;
                    @JacksonXmlProperty(localName = "Route")
                    private String route;


                }
            }

            @Data
            @NoArgsConstructor
            @AllArgsConstructor
            @Builder
            public static class HotelCardBean {
                /**
                 * CardName : visa
                 */
                @JacksonXmlElementWrapper(useWrapping = false)
                @JacksonXmlProperty(localName = "CardItem")
                private List<CardItemBean> cardItem;

                @Data
                @NoArgsConstructor
                @AllArgsConstructor
                @Builder
                public static class CardItemBean {
                    @JacksonXmlProperty(localName = "CardName")
                    private String cardName;
                    @JacksonXmlProperty(localName = "cardinfo")
                    private String cardInfo;

                }
            }

            @Data
            @NoArgsConstructor
            @AllArgsConstructor
            @Builder
            public static class HotelPictureInfoBean {
                /**
                 * SmallPic : {"ImgUrl":"http://system.greentree.com.cn:8080/op/Module_ERP/Images/HotelDisplay/inn021002.jpg"}
                 * BigPic : {"ImgUrl":"http://system.greentree.com.cn:8080/op/Module_ERP/Images/HotelDisplay/inn021002b.jpg"}
                 */

                @JacksonXmlProperty(localName = "HotelPic")
                private HotelPicBean hotelPic;
                /**
                 * SmallPic : {"ImgUrl":"http://system.greentree.com.cn:8080/op/Module_ERP/Images/HotelDisplay/smap021002.jpg"}
                 * BigPic : {"ImgUrl":"http://system.greentree.com.cn:8080/op/Module_ERP/Images/HotelDisplay/bmap021002.jpg"}
                 */

                @JacksonXmlProperty(localName = "HotelMap")
                private HotelMapBean hotelMap;


                @Data
                @NoArgsConstructor
                @AllArgsConstructor
                @Builder
                public static class HotelPicBean {
                    /**
                     * ImgUrl : http://system.greentree.com.cn:8080/op/Module_ERP/Images/HotelDisplay/inn021002.jpg
                     */

                    @JacksonXmlProperty(localName = "SmallPic")
                    private ImgUrl smallPic;
                    /**
                     * ImgUrl : http://system.greentree.com.cn:8080/op/Module_ERP/Images/HotelDisplay/inn021002b.jpg
                     */

                    @JacksonXmlProperty(localName = "BigPic")
                    private ImgUrl bigPic;
                }

                @Data
                @NoArgsConstructor
                @AllArgsConstructor
                @Builder
                public static class HotelMapBean {
                    /**
                     * ImgUrl : http://system.greentree.com.cn:8080/op/Module_ERP/Images/HotelDisplay/smap021002.jpg
                     */

                    @JacksonXmlProperty(localName = "SmallPic")
                    private ImgUrl smallPic;
                    /**
                     * ImgUrl : http://system.greentree.com.cn:8080/op/Module_ERP/Images/HotelDisplay/bmap021002.jpg
                     */

                    @JacksonXmlProperty(localName = "BigPic")
                    private ImgUrl bigPic;
                }
                @Data
                @NoArgsConstructor
                @AllArgsConstructor
                @Builder
                public static class ImgUrl{
                    @JacksonXmlProperty(localName = "ImgUrl")
                    private String imgUrl;
                }
            }
        }
    }
}